from selenium import webdriver
from selenium.webdriver.common.by import By

driver = webdriver.Chrome()
driver.get('https://www.baidu.com')
#查找一个标签
input = driver.find_element(By.LINK_TEXT, '新闻')
print(input)
print(input.get_attribute('outerHTML'))
driver.quit()
